<template>
  <elm-page-tb>
    <template #top>
      <el-input placeholder="请查询输入内容" prefix-icon='el-icon-search' size="mini" style="width: 250px;" v-model="postData.name" clearable></el-input>
      <right>
        <el-button-group>
          <el-button icon="el-icon-search" size="mini" @click="v_getData()">查询</el-button>
        </el-button-group>
      </right>
    </template>
    <elm-table url="/system/login/flow/GetFlowinsInfo_InitByUser" :post-data="postData" :default-expand-all="true" height="100%">
      <el-table-column prop="sys_code_key" label="流程号" width="200px"  align="center"></el-table-column>
      <el-table-column prop="title" label="流程" width="160px"  align="center"></el-table-column>
      <el-table-column prop="nodeins_title" label="节点" min-width="160px" header-align="center"></el-table-column>
      <el-table-column prop="sys_createtime" label="开始时间" width="160px"  align="center"></el-table-column>
      <el-table-column fixed="right" label="当前节点" width="160px" align="center">
        <template v-slot="scope">
          <elm-open-button url="/system/flow/flow_canvas" theme="white" :full="false" width="90%" height="90%" title="节点信息"
                           :data="{'show_flowins':'yes','flow_code':scope.row.flow_code,'data_id':scope.row.id}"
                           v-if="!em(scope.row.nodeins_id)" type="text">
            {{scope.row.status=='completed'?'流程已完成':scope.row.nodeins_title}}</elm-open-button>
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="160px" align="center">
        <template v-slot="scope">
          <elm-open-button :url="scope.row.url" width="700" height="450" title="信息"
                           :data="{'page_type':'show','flow_code':scope.row.flow_code,'model':scope.row}"
                           type="text">查看</elm-open-button>
          <elm-open-button v-if="scope.row.nodeins_status=='running' && scope.row.preson_status=='running'" :url="scope.row.url" width="700" height="450" title="提交"
                           :data="{'page_type':'edit','flow_code':scope.row.flow_code,'model':scope.row}"
                           type="text">提交</elm-open-button>
        </template>
      </el-table-column>
    </elm-table>
  </elm-page-tb>
</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: { name: null },

      noDelFLowCode:{
        'ask_leave':true,
      },
    }
  },
  created() {
  },
  methods: {
    async v_getData(){
      this.tablebinding();
    },

    em: function (s) {
      if (s == null || s == '') { return true; }
      else { return false; }
    },
  }
}
</script>

<style scoped>
</style>